package com.dao;

import com.util.DBpool.DBconnection;

/**
 * Created by wlc on 2018/7/26.
 */
public class SystemDao {
    /**
     * 获取计算部分QM数据条数
     * @return QM数据条数
     */
    public static int getQMPartDataNum(){
        DBconnection connection = new DBconnection();
//        qm
        connection.setSheet_name("QM_USER_AND_PBC");

        int originQM = connection.getDataNumFromDB();

        connection.setSheet_name("QM_Caluculation_Track");

        int qm_track = connection.getDataNumFromDB();

        return qm_track + originQM;
    }

    /**
     * 获取计算部分MM数据条数
     *
     * @return MM数据条数
     */
    public static int getMMPartDataNum() {
        DBconnection connection = new DBconnection();
//        experiment
        connection.setSheet_name("MM_Caluculation_Track");

        int mm_nums = connection.getDataNumFromDB();
        return mm_nums;
    }

    /**
     * 获取实验部分数据条数
     * @return 实验数据条数
     */
    public static int getExperimentPartDataNum(){
        DBconnection connection = new DBconnection();
//        experiment
        connection.setSheet_name("experiment_User_AND_Method");

        return connection.getDataNumFromDB() * 159;
    }

    public static int getBoneTumorClinicalDataNum() {
        DBconnection connection = new DBconnection();
        connection.setSheet_name("BoneTumor_user_Information");
        int rowNum = connection.getDataNumFromDB();
        return rowNum * 108;
    }


    /**
     * 获取随访数据条数 （包含 骨肿瘤）
     * @return 随访数据条数
     */
    public static int getBoneTumorPartDataNum(){
        DBconnection connection = new DBconnection();
//      BoneTumor
        connection.setSheet_name("BoneTumor_user_Information");
        int BoneTumor = connection.getDataNumFromDB();
//      Melanoma
        connection.setSheet_name("Melanoma_user_Information");
        int Melanoma = connection.getDataNumFromDB();

        //seer数据
        connection.setSheet_name("seer");
        int SEER = connection.getDataNumFromDB();


        return BoneTumor + SEER + Melanoma;
    }

    /**
     * 获取MD数据 替换 原始 临床数据常量6354
     */
    public static int getClinicalPartDateNum() {


        DBconnection connection = new DBconnection();
        connection.setSheet_name("MD_Scattered_Data");
        int md = connection.getDataNumFromDB();

        return md;


    }
}
